﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Linq;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace BACKOFFICE
{
    public partial class MenuSetup : DevExpress.XtraEditors.XtraUserControl
    {
        public MenuSetup()
        {
            InitializeComponent();
        }

        private void MenuSetup_Load(object sender, EventArgs e)
        {
            foreach(DataRow item in DataTableClass.MenuItems.Rows)
            {
                ListViewItem newList = new ListViewItem(item["MenuItemCategory"].ToString().Trim());
                newList.SubItems.Add(item["MenuItemName"].ToString().Trim());
                newList.SubItems.Add(String.Format("{0:C}", item["MenuItemCost"].ToString().Trim()));
                newList.SubItems.Add(String.Format("{0:c}", item["MenuItemSalePrice"].ToString().Trim()));
                

                //newList.SubItems.Add("4");

                
                listView2.Items.Add(newList);
            }
        }
    }
}
